package com.xzx.email;

import sun.misc.BASE64Encoder;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Base64Util {

    /**
     * @throws IOException
     */
    public static void main(String[] args) throws IOException {
        BASE64Encoder encoder = new BASE64Encoder();
        System.out.println("please input user name:");
        String username = new BufferedReader(new InputStreamReader(System.in)).readLine();
        System.out.println(encoder.encode(username.getBytes()));
        System.out.println("please input password:");
        String password = new BufferedReader(new InputStreamReader(System.in)).readLine();
        System.out.println(encoder.encode(password.getBytes()));
    }


}
